! function() {
    var e = { logType: "webpv", version: "0.1", run: function() { e.init();
            var t = {},
                o = "lt=" + this.logType + "&lv=" + this.version,
                t = this.track.getParams();
            for (var r in t) o += "&" + r + "=" + encodeURIComponent(t[r]);
            var n = document.createElement("img");
            n.setAttribute("style", "display:none;"), n.src = "https://track.biyao.com/by.gif?" + o, document.body.appendChild(n) }, init: function() {
            var t = e.tools.parseHref(),
                o = 86400,
                r = t.source || t.it || "";
            if (r.length > 0) {
                var n = new Date;
                n.setTime(n.getTime() + 1e3 * o), document.cookie = "source=" + r + "; Domain=.biyao.com; Expires=" + n.toGMTString() + "; Path=/", document.cookie = "channel=" + r + "; Domain=.biyao.com; Expires=" + n.toGMTString() + "; Path=/" }
            var i = e.tools.parseCookie(),
                a = i.uuid || "";
            if ("" == a) {
                var o = 31536e3;
                a = e.tools.randomStr(24);
                var n = new Date;
                n.setTime(n.getTime() + 1e3 * o), document.cookie = "uuid=" + a + "; Domain=.biyao.com; Expires=" + n.toGMTString() + "; Path=/" } }, track: { getParams: function() {
                var t = e.tools.parseCookie(),
                    o = e.tools.parseHref(),
                    r = {};
                return r.pf = t.platform || window.__platform || this.getOs(t) || "", r.ctm = this.getCurrentTime(), r.pvid = this.getPageViewID(), r.uu = t.uuid || "", r.u = t.uid || "", r.uic = t.idcard || "", r.tk = (t.token || "/t/n/r").split("/t/n/r")[1], r.url = e.tools.removeURLAnchor(document.URL || window.location.href || ""), r.rf = e.tools.removeURLAnchor(document.referrer || ""), r.src = o.source || o.it || t.source || t.channel || "", r.av = t.__appversion || "", r.dt = t.__device || "", r.osv = t.__osv || "", r.ua = navigator.userAgent || "", r.dw = window.screen.width || "", r.dh = window.screen.height || "", r.net = t.__net || "", r.tt = document.title || "", r.pt = window.__pageType || "", r }, getPageViewID: function() {
                return e.tools.randomStr(32) }, getCurrentTime: function() {
                var t = new Date;
                return e.tools.formatTime(t) }, getOs: function(e) {
                var t = e.fromapp || "";
                return t.indexOf("|") > 0 && (t = t.substring(0, t.indexOf("|"))), t } }, tools: { parseCookie: function() {
                var e = {},
                    t = document.cookie || "";
                cookies = t.split(";");
                for (var o = 0; o < cookies.length; o++)
                    if (cookie = cookies[o], cookie = this.trim(cookie), "" !== cookie) {
                        var r = cookie.split("=");
                        if (2 == r.length) {
                            var n = decodeURIComponent(r[0]),
                                i = decodeURIComponent(r[1]); "" !== n && (e[n] = i) } }
                return e }, removeURLAnchor: function(e) {
                return e.indexOf("#") > 0 && (e = e.substring(0, e.indexOf("#"))), e }, parseHref: function() {
                var e = {},
                    t = this.removeURLAnchor(document.URL),
                    o = t.split("?").slice(1).join("");
                if (o.length < 3) return e;
                for (var r = o.split("&"), n = 0; n < r.length; n++) {
                    var i = r[n],
                        a = i.indexOf("=");
                    if (!(0 > a || a == i.length - 1)) {
                        var s = i.substring(0, a),
                            c = i.substring(a + 1);
                        0 != s.length && 0 != c.length && (e[s] = decodeURIComponent(c)) } }
                return e }, trim: function(e) {
                return e.replace(/^(\s|\u00A0)+/, "").replace(/(\s|\u00A0)+$/, "") }, randomStr: function(e) { e = e || 32;
                for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", o = "", r = 0; e > r; r++) o += t.charAt(Math.floor(Math.random() * t.length));
                return o }, add0: function(e) {
                return 10 > e ? "0" + e : e }, formatTime: function(e) {
                var t = e.getFullYear(),
                    o = e.getMonth() + 1,
                    r = e.getDate() + 1,
                    n = e.getHours() + 1,
                    i = e.getMinutes() + 1,
                    a = e.getSeconds() + 1;
                return t + "-" + this.add0(o) + "-" + this.add0(r) + " " + this.add0(n) + ":" + this.add0(i) + ":" + this.add0(a) } } };
    e.run() }();
